package com.hnyc.goods.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hnyc.goods.mapper.GoodsRelMapper;
import com.hnyc.goods.domain.GoodsRel;
import com.hnyc.goods.service.IGoodsRelService;

/**
 * goodsService业务层处理
 * 
 * @author zero
 * @date 2023-03-10
 */
@Service
public class GoodsRelServiceImpl implements IGoodsRelService 
{
    @Autowired
    private GoodsRelMapper goodsRelMapper;

    /**
     * 查询goods
     * 
     * @param id goods主键
     * @return goods
     */
    @Override
    public GoodsRel selectGoodsRelById(Long id)
    {
        return goodsRelMapper.selectGoodsRelById(id);
    }

    /**
     * 查询goods列表
     * 
     * @param goodsRel goods
     * @return goods
     */
    @Override
    public List<GoodsRel> selectGoodsRelList(GoodsRel goodsRel)
    {
        return goodsRelMapper.selectGoodsRelList(goodsRel);
    }

    /**
     * 新增goods
     * 
     * @param goodsRel goods
     * @return 结果
     */
    @Override
    public int insertGoodsRel(GoodsRel goodsRel)
    {
        return goodsRelMapper.insertGoodsRel(goodsRel);
    }

    /**
     * 修改goods
     * 
     * @param goodsRel goods
     * @return 结果
     */
    @Override
    public int updateGoodsRel(GoodsRel goodsRel)
    {
        return goodsRelMapper.updateGoodsRel(goodsRel);
    }

    /**
     * 批量删除goods
     * 
     * @param ids 需要删除的goods主键
     * @return 结果
     */
    @Override
    public int deleteGoodsRelByIds(Long[] ids)
    {
        return goodsRelMapper.deleteGoodsRelByIds(ids);
    }

    /**
     * 删除goods信息
     * 
     * @param id goods主键
     * @return 结果
     */
    @Override
    public int deleteGoodsRelById(Long id)
    {
        return goodsRelMapper.deleteGoodsRelById(id);
    }
}
